package com.xiong.controlor;

import com.xiong.beans.Xs;
import com.xiong.service.Xsservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class Xscontrolor {
    @Autowired
    private Xsservice xsservice;

    @GetMapping("/test1")
    public List<Xs> getall(){
//        m.addAttribute("name","xiong");
//
//        TestId id=new TestId();
//        id.setUserName("jiang");
//        id.setMm("123");
//        m.addAttribute("id",id);

        List<Xs> list=xsservice.getall();
        System.out.println(list);
//        m.addAttribute("list",list);
        return list;
    }


}
